const fs = require('fs');

function readFile(filePath) {
    return new Promise((resolve, reject) => {
        fs.readFile(filePath, 'utf8', (err, data) => {
            if (err) {
                reject(err);
            } else {
                resolve(data);
            }
        });
    });
}

;
async function go() {
    let dataA = await readFile('./data/1.txt');
    let dataB = await readFile('./data/22.txt');
    let dataC = await readFile('./data/3.txt');
    console.log(dataA, dataB, dataC);
}

/* 1. 函数外部处理 */
go().catch(error => {
    console.log('error', error);

});

console.log('end');